package com.yjd.bi.growing.ntx.impl;

import com.yjd.bi.growing.dao.IUserGrowingStatisticsDao;
import com.yjd.bi.growing.model.UserGrowingStatisticsModel;
import com.yjd.bi.growing.ntx.IUserGrowingStatisticsServiceNtx;
import com.yjd.comm.util.FrameUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 【无事物】 用户服务实现
 * Created by yangchangyan on 2018/8/15.
 */
@Service("nTxUserGrowingStatisticsService")
public class UserGrowingStatisticsServiceNtxImpl implements IUserGrowingStatisticsServiceNtx {

  @Resource
  private IUserGrowingStatisticsDao userGrowingStatisticsDao;

  @Override
  public UserGrowingStatisticsModel insert(UserGrowingStatisticsModel model) throws Exception {
    UserGrowingStatisticsModel ugsm = userGrowingStatisticsDao.insertModel(model, true);
    if(ugsm == null){
      FrameUtil.throwBaseException1("创建失败");
    }
    return ugsm;
  }
}
